<?php
namespace app\api\controller;
/**
 * Description of Apiuser
 * 用户接口
 * @author  高磊<1455209597@qq.com>
 */
class Apiuser extends Api{
    protected $userToken;
    protected $uid;
            
    function __construct() {
        parent::__construct();
        if(empty($this->askData['token'])){
            echo json_encode(msback(120,'用户授权失效',''),256);            exit();
        }
        $uid= \think\Db::name('user')->where(['token'=>$this->askData['token']])->value('id');
        if(empty($uid)){
            echo json_encode(msback(120,'非法用户请求',''),256);            exit();
        }
        $this->uid=$uid;
    }
}
